package Day09;

import java.util.*;

public class Main {
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        char[] arr = in.next().toCharArray();
        StringBuilder tmp = new StringBuilder();
        int cnt = 0;
        for(int i = arr.length - 1; i >= 0; i--){
            tmp.append(arr[i]);
            cnt++;
            if(cnt == 3){
                cnt = 0;
                tmp.append(',');
            }
        }
        if(tmp.charAt(tmp.length() - 1) == ','){
            tmp.deleteCharAt(tmp.length() - 1);
        }
        System.out.println(tmp.reverse());
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        if(n == 1){
            System.out.println(1);
            return;
        }
        int[] dp = new int[n];
        dp[0] = 1;
        dp[1] = 2;
        for(int i = 2; i < n; i++){
            dp[i] = dp[i - 1] + dp[i - 2];
        }
        System.out.println(dp[n - 1]);
    }


    public boolean IsContinuous (int[] numbers) {
        int minValue = 15;
        int maxVlaue = -1;
        int num = 0;
        int[] arr = new int[14];
        for(int e : numbers){
            if(e != 0){
                minValue = Math.min(minValue, e);
                maxVlaue = Math.max(maxVlaue, e);
                arr[e]++;
                if(arr[e] >= 2){
                    return false;
                }
            }else{
                num++;
            }
        }
        int diff = maxVlaue - minValue - 1;
        if(diff > 3){
            return false;
        }
        for(int e : numbers){
            if(e > minValue && e < maxVlaue){
                diff --;
            }
        }
        if(diff <= num){
            return true;
        }
        return false;
    }
}
